package com.jah.picavue.client.events;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class StartTimerEvent extends
		GwtEvent<StartTimerEvent.Handler> {
	
	/**
	 * Interface to describe this event. Handlers must implement.
	 */
	public interface Handler extends EventHandler {
		public void onStartTimerRequest(StartTimerEvent evt);
	}
	
	@Override
	protected void dispatch(StartTimerEvent.Handler handler) {
		handler.onStartTimerRequest(this);
	}

	@Override
	public GwtEvent.Type<StartTimerEvent.Handler> getAssociatedType() {
		return TYPE;
	}
	
	public static final GwtEvent.Type<StartTimerEvent.Handler> TYPE = new GwtEvent.Type<StartTimerEvent.Handler>();
	
	private int period = 2500;
	
	public int getPeriod() {
		return this.period;
	}
	
	public void setPeriod(int millisec) {
		this.period = millisec;
	}
}
